package com.yykj.user.center.server.controller.web;

import com.yykj.common.vo.ResultVO;
import com.yykj.hospital.client.feign.HospitalServerFeignClient;
import com.yykj.user.center.server.form.UserLoginForm;
import com.yykj.user.center.server.service.DeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author chenl
 * @version 1.0
 * @date 2021/10/28 20:54
 */
@Api(tags = "患者端科室相关接口")
@RestController
@RequestMapping("/api/patient/web")
@SuppressWarnings("unchecked")
public class PatientWebController {

    @GetMapping("/showTwelveHotDept")
    @ApiOperation("展示12个热门科室")
    public ResultVO showTwelveHotDept(@RequestParam(value="hospitalId",required = true) Integer hospitalId){
        return ResultVO.success(hospitalServerFeignClient.listHostDepartment(hospitalId));
    }

    @GetMapping("/showAllHotDept")
    @ApiOperation("展示所有热门科室")
    public ResultVO showAllHotDept(@RequestParam(value="hospitalId",required = true) Integer hospitalId){
        return ResultVO.success(hospitalServerFeignClient.listHostDepartment(hospitalId));
    }

    private HospitalServerFeignClient hospitalServerFeignClient;

    @Autowired
    public void setHospitalServerFeignClient(HospitalServerFeignClient hospitalServerFeignClient) {
        this.hospitalServerFeignClient = hospitalServerFeignClient;
    }
}
